package com.md.api.dao;

import com.md.api.entity.UserPointsRecord;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface UserPointRecordMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(UserPointsRecord record);

    UserPointsRecord selectByPrimaryKey(Integer id);

    int insertBatch(@Param("list") List<UserPointsRecord> userPointsRecords);

    void updateStatus(@Param("orderNo")String orderNo,@Param("status")Integer status);
    void updateStatusById(@Param("status")Integer status,@Param("id")Integer id);

    List<UserPointsRecord> pointDetails(@Param("userId")String userId);

    List<UserPointsRecord> validRecords(@Param("userId")String userId);

    int handleExpirePoint();
    Double getPoint(@Param("userId")String userId);
    void updateRemainingPoint(@Param("id")Integer id, @Param("remainingPoint")double remainingPoint,@Param("status")Integer status);
}